#include "hikari.h"

bool Hikari::loadScene(wstring sceneName, HikariContext*context){
	HikariSceneLoader loader;
	return loader.loadScene(sceneName, context);
}

HObj* Hikari::instantiateTemplate(wstring&path, HikariContext*context, vector3df&position, vector3df&rotation){
	return instantiateTemplate(path.c_str(),context, position, rotation);
}

HObj* Hikari::instantiateTemplate(const wchar_t*path, HikariContext*context, vector3df&position, vector3df&rotation){
	HikariSceneLoader loader;
	HikariFileReader reader(wstring(L"./media/")+wstring(path)+wstring(L".tpl"));
	std::list<HObj*> listOfObject;
	HObj*object=loader.readFile(reader, context, &listOfObject);
	loader.onSceneLoadOnUpdateableObjects(listOfObject, context);
	if(object!=NULL){
		object->setPosition(position);
		object->setRotation(rotation);
	}
	return object;
}

void Hikari::removeObject(HObj*object, HikariContext*context){

}